package com.aw.jsr303.ejemplo001;


import javax.validation.Constraint;
import javax.validation.Payload;
import javax.validation.ReportAsSingleViolation;
import javax.validation.constraints.NotNull;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * User: gmc
 * Date: 30/06/2010
 */
@NotNull
@OnlyLetters
@Target({METHOD, FIELD})
@Retention(RUNTIME)
@Constraint(validatedBy = {})
@Documented
@ReportAsSingleViolation
public @interface OnlyLettersNotNull {
    String message() default "com.aw.jsr303.ejemplo001.constraints.onlylettersnotnull";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}